package com.esiran.payadmin.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.esiran.payadmin.dao.MenuDao;
import com.esiran.payadmin.exception.APIRespException;
import com.esiran.payadmin.model.Menu;
import com.esiran.payadmin.service.MenuService;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

@Service
public class MenuServiceImpl extends ServiceImpl<MenuDao, Menu> implements MenuService {
    @Override
    public void create(Menu menu) {
//        baseMapper.insert()

        if (StringUtils.isEmpty(menu.getRouter())){
            menu.setRouter(null);
        }
        baseMapper.insert(menu);
    }
}
